//
//  MSEnterVC.m
//  MS
//
//  Created by Yuan on 13-4-14.
//  Copyright (c) 2013年 He Yuan. All rights reserved.
//

#import "MSEnterVC.h"
#import <QuartzCore/QuartzCore.h>

@interface MSEnterVC ()

@end

@implementation MSEnterVC


-(id)initWithInitString:(NSString *)string title:(NSString *)title maxCount:(unsigned)mc delegate:(id)delegate
{
    self = [super initWithInitString:string maxCount:mc delegate:delegate];
    
    if (self)
    {
        self.title = title;

    }
    return self;
}

-(void)loadView
{
    [super loadView];
    
    self.txtView.layer.cornerRadius = 2.0f;
    self.txtView.layer.masksToBounds = YES;
    self.txtView.placeholder = HYLocalizedString(@"请在此输入内容");
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [self setTitle:self.title showBackButton:YES];
    
    [self setRightItem:HYLocalizedString(@"确定")];
}


-(void)rightBarButtonItemAction:(UIButton *)btn
{
    [self.navigationController popViewControllerAnimated:YES];
   
    if (self.universalDelegate && [self.universalDelegate respondsToSelector:@selector(didFinishAciton:withInfo:)])
    {
        [self.universalDelegate didFinishAciton:self withInfo:self.txtView.text];
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
